package com.bw.a2207a.view.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bw.a2207a.R
import com.bw.a2207a.bean.TypeItemBean
import com.bw.a2207a.util.GlideUtil
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 *
 * @ClassName: GoodsAdapter
 * @Description: java类作用描述
 * @Author: zhangyanchao
 * @CreateDate: 2024/10/23 4:00 PM
 * @Version: 1.0
 */
class TypeRightAdapter(layoutResId: Int, data: MutableList<TypeItemBean>) :
    BaseQuickAdapter<TypeItemBean, BaseViewHolder>(layoutResId, data) {
    override fun convert(holder: BaseViewHolder, item: TypeItemBean) {
        //Glide.with(context).load(item.goods_default_icon).into(holder.getView<ImageView>(R.id.iv))

        GlideUtil.loadImg(context, item.category_icon, holder.getView<ImageView>(R.id.iv))
        holder.setText(R.id.tv_desc, item.category_name)
    }
}